// run: $exec < input
#include <iostream>
#include <string>

std::string a, b;

int count_one(std::string const & s)
{
	int ret = 0;
	for (auto i : s) ret += (i == '1');
	return ret;
}

int main()
{
	std::cin >> a >> b;
	int c1 = count_one(a);
	int c2 = count_one(b);
	if (c1 + (c1 & 1) < c2) {
		std::cout << "NO\n";
		return 0;
	}

	std::cout << "YES\n";
}

